<?php
// +----------------------------------------------------------------------
// | 众联TK架构 [ ZoomTk ]
// +----------------------------------------------------------------------
// | 版权所有 2017~2037 成都众联思索科技有限公司 [ http://www.zoomtk.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://www.sopvip.com
// +----------------------------------------------------------------------
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------

namespace app\expbao\validate;

use think\Validate;

/**
 * 用户验证器
 * @package app\admin\validate
 * @author Sunday <153788231@qq.com>
 */
class ExRule extends Validate
{
    //定义验证规则
    protected $rule = [
        'func_name|方法名' => 'require|unique:expbao_rules',
        //'member_name|用户名' => 'require|unique:member_user',
        'func|方法' => 'require|unique:expbao_rules',
    ];

    //定义验证提示
    protected $message = [
        'func_name.require' => '请输入方法名称',
        'func.require'    => '方法不能为空',
        //'member_email.email'      => '邮箱格式不正确',
        'func_name.unique'     => '该方法名称已经存在',
        'fun.unique' => '该方法已经存在',

    ];

    //定义验证场景
    protected $scene = [
        //更新
        //'update'  =>  ['member_email', 'member_passwd' => 'length:6,20', 'member_mobile'],
        //登录
       // 'signin'  =>  ['member_name' => 'require', 'member_passwd' => 'require'],
    ];
}
